gtk4.git
9 years agovulkan: Push the correct matrix when drawing
Benjamin Otte [Fri, 9 Dec 2016 04:53:04 +0000 (05:53 +0100)]
vulkan: Push the correct matrix when drawing

Instead of pushing the root matrix, push the world matrix for the
current node. That way, the bounds we emit as vertices are actually
properly transformed.

9 years agovulkan: Enable alpha blending
Benjamin Otte [Fri, 9 Dec 2016 04:51:51 +0000 (05:51 +0100)]
vulkan: Enable alpha blending

We will need that once we actually composite stuff.

9 years agovulkan: Redo descriptor set handling
Benjamin Otte [Fri, 9 Dec 2016 01:55:47 +0000 (02:55 +0100)]
vulkan: Redo descriptor set handling

First, we collect all the info about descriptor sets into a hash table,
then we use its size to determine the amount of sets and allocate those
before we finally go ahead and use the hash table's contents to
initialize the descriptor sets.

And then we're ready to render.

9 years agovulkan: Move remaining structs to VulkanRender object
Benjamin Otte [Thu, 8 Dec 2016 23:06:59 +0000 (00:06 +0100)]
vulkan: Move remaining structs to VulkanRender object

It now gets to maintain things.

9 years agovulkan: Create framebuffers from GskVulkanRender object
Benjamin Otte [Thu, 8 Dec 2016 21:35:16 +0000 (22:35 +0100)]
vulkan: Create framebuffers from GskVulkanRender object

Also create them on-demand, as they need to be created per-image and
per-framebuffer, so we don't want to create loads of them.

9 years agovulkan: Turn swapchain image targets into GskVulkanImages
Benjamin Otte [Thu, 8 Dec 2016 20:14:41 +0000 (21:14 +0100)]
vulkan: Turn swapchain image targets into GskVulkanImages

This gives us proper refcounting here, too. And there's no longer a
difference between the different types of images.

9 years agovulkan: Store width/height of GskVulkanImage
Benjamin Otte [Thu, 8 Dec 2016 19:46:02 +0000 (20:46 +0100)]
vulkan: Store width/height of GskVulkanImage

This is to enable lazy framebuffer creation later.

9 years agovulkan: Turn GskVulkanImage into a GObject
Benjamin Otte [Thu, 8 Dec 2016 19:19:56 +0000 (20:19 +0100)]
vulkan: Turn GskVulkanImage into a GObject

This way, we can do real refcounting on them.

9 years agovulkan: Hook up image upload mechanism to env variables
Benjamin Otte [Thu, 8 Dec 2016 19:05:53 +0000 (20:05 +0100)]
vulkan: Hook up image upload mechanism to env variables

Instead of having to decie at compile-time, check if
GSK_RENDERING=staging-image was given, and if so, select the staging
image upload mode.

9 years agovulkan: Don't wait until graphics are done computing
Benjamin Otte [Thu, 8 Dec 2016 18:56:56 +0000 (19:56 +0100)]
vulkan: Don't wait until graphics are done computing

We can let the GPU do its stuff without waiting. The GPU knows what it's
doing.

Which means we now get a lot of time to spend on doing CPU things (read:
we're way better in benchmarks).

The old behavior is safer, so we want to keep it around for debugging.
It can be reenabled with GSK_RENDERING_MODE=sync.

9 years agovulkan: Keep render objects around
Benjamin Otte [Thu, 8 Dec 2016 17:40:35 +0000 (18:40 +0100)]
vulkan: Keep render objects around

That way we can reuse them. We only create a new one if the last render
operation hasn't finished executing.

9 years agovulkan: Move command pool and fence into render object
Benjamin Otte [Thu, 8 Dec 2016 17:03:05 +0000 (18:03 +0100)]
vulkan: Move command pool and fence into render object

9 years agovulkan: Make the GskVulkanRender struct private
Benjamin Otte [Thu, 8 Dec 2016 16:55:32 +0000 (17:55 +0100)]
vulkan: Make the GskVulkanRender struct private

9 years agovulkan: Make the VulkanRender object allocated
Benjamin Otte [Thu, 8 Dec 2016 16:46:08 +0000 (17:46 +0100)]
vulkan: Make the VulkanRender object allocated

That way, we can have multiple of those and keep them around for reuse.

9 years agovulkan: Also wait on the draw semaphore when present()ing
Benjamin Otte [Thu, 8 Dec 2016 16:40:07 +0000 (17:40 +0100)]
vulkan: Also wait on the draw semaphore when present()ing

That way we have a synchronization primitive at the start and at the
end.

9 years agovulkan: Add GskVulkanRenderPass
Benjamin Otte [Thu, 8 Dec 2016 12:26:36 +0000 (13:26 +0100)]
vulkan: Add GskVulkanRenderPass

And move the actual rendering code there.

A RenderPass is a collection of operations on the same target that
get executed one after another. It roughly targets VkRenderPass or
rather the subpasses of a VkRenderPass.

For now, only the infrastructure is there. No real stuff is happening.

9 years agovulkan: Add GskVulkanRender object
Benjamin Otte [Wed, 7 Dec 2016 13:50:52 +0000 (14:50 +0100)]
vulkan: Add GskVulkanRender object

This is refactoring work.

GskVulkanRender is supposed to be the global object for a render
operation, ie GskVulkanRenderer.render() will create this object for
what it does.

The object will be split into stages that perform the operations
necessary to create a drawing.

9 years agovulkan: Make MVP matrix available to vertex shader
Benjamin Otte [Wed, 7 Dec 2016 00:48:31 +0000 (01:48 +0100)]
vulkan: Make MVP matrix available to vertex shader

We use push constants for this.

9 years agovulkan: Upload image data directly
Benjamin Otte [Tue, 6 Dec 2016 22:29:38 +0000 (23:29 +0100)]
vulkan: Upload image data directly

Instead of using a staging iamge, we require the final image to be
linearly allocated and have host-visible memory.

This improves performance quite a bit.

The old code is still there and can be enabled with a simple change
to a #define in gskvulkanimage.h

9 years agovulkan: Make GskVulkanRenderer work
Benjamin Otte [Tue, 6 Dec 2016 13:42:46 +0000 (14:42 +0100)]
vulkan: Make GskVulkanRenderer work

We now create a Cairo renderer, render to an image surface and upload
and retnder it with Vulkan.

9 years agoxim: Use the native parent window for the X connection
Benjamin Otte [Mon, 5 Dec 2016 23:09:59 +0000 (00:09 +0100)]
xim: Use the native parent window for the X connection

Don't try to gdk_window_get_xid() on the current window.

9 years agox11: Don't make random windows native
Benjamin Otte [Mon, 5 Dec 2016 22:40:16 +0000 (23:40 +0100)]
x11: Don't make random windows native

Instead, complain if somebody calls gdk_x11_window_get_xid() on a
non-native window.

We cannot make random windows native anymore because there's no GSK
renderer associated with them, so we cannot draw them.

9 years agogsk: Pass texture coordinates to Vulkan renderer
Benjamin Otte [Mon, 5 Dec 2016 22:07:56 +0000 (23:07 +0100)]
gsk: Pass texture coordinates to Vulkan renderer

We just render the coordinates as color, we don't do anything with them
yet.

9 years agogsk: Loads of work on Vulkan backend
Benjamin Otte [Mon, 5 Dec 2016 01:50:06 +0000 (02:50 +0100)]
gsk: Loads of work on Vulkan backend

We can now upload vertices.

And we use this to draw a yellow background. Which is clearly superior
to not drawing anything.

Also, we have shaders now. If you modify them, you need glslc installed
so they can be recompiled into Spir-V bytecode.

9 years agoconfigure: Improve Vulkan detection
Benjamin Otte [Sun, 4 Dec 2016 17:10:18 +0000 (18:10 +0100)]
configure: Improve Vulkan detection

1. Output Vulkan status in summary
2. Add missing "test" call
3. Check for glslc

The glslc check will be necessary later for the code that automatically
compiles the Vulkan glsl source to Spir-V.
Nothing happens if glslc is not available - unless you modify the glsl.

9 years agovulkan: acquire/present images when drawing
Benjamin Otte [Thu, 1 Dec 2016 03:07:20 +0000 (04:07 +0100)]
vulkan: acquire/present images when drawing

Another step towards the final goal of actually showing something.

9 years agogskvulkan: Create render pass and command pool
Benjamin Otte [Wed, 30 Nov 2016 02:59:28 +0000 (03:59 +0100)]
gskvulkan: Create render pass and command pool

9 years agogskvulkanrenderer: Create imagevies and framebuffers
Benjamin Otte [Wed, 30 Nov 2016 01:08:17 +0000 (02:08 +0100)]
gskvulkanrenderer: Create imagevies and framebuffers

9 years agogsk: Add a vulkan debug category
Benjamin Otte [Wed, 30 Nov 2016 01:07:57 +0000 (02:07 +0100)]
gsk: Add a vulkan debug category

9 years agovulkan: Expose the swapchain images in public API
Benjamin Otte [Tue, 29 Nov 2016 23:54:48 +0000 (00:54 +0100)]
vulkan: Expose the swapchain images in public API

9 years agogsk: Add skeleton for Vulkan renderer
Benjamin Otte [Tue, 29 Nov 2016 15:33:14 +0000 (16:33 +0100)]
gsk: Add skeleton for Vulkan renderer

The renderer itself obviously doesn't do anything.

9 years agovulkan: Register debug handler
Benjamin Otte [Tue, 29 Nov 2016 15:29:19 +0000 (16:29 +0100)]
vulkan: Register debug handler

We now hook Vulkan error reporting into glib's error reporting.

I'm not sure on the severity handling yet, but we can fix that as we go
along.

9 years agogdk: Add GDK_VULKAN env variable
Benjamin Otte [Tue, 29 Nov 2016 14:35:04 +0000 (15:35 +0100)]
gdk: Add GDK_VULKAN env variable

Also add 2 flags:

GDK_VULKAN="disable" will disable Vulkan usage.

GDK_VULKAN="validate" will enable VK_LAYER_LUNARG_standard_validation.

9 years agox11: Call gdk_display_sync() when creating Vulkan surfaces
Benjamin Otte [Tue, 29 Nov 2016 13:47:59 +0000 (14:47 +0100)]
x11: Call gdk_display_sync() when creating Vulkan surfaces

The Vulkan driver wants to operate on an X Window that it is sure does
exist.

9 years agovulkan: More work on GdkVulkanContext
Benjamin Otte [Tue, 29 Nov 2016 02:20:31 +0000 (03:20 +0100)]
vulkan: More work on GdkVulkanContext

Code has now arrived at creation of swapchains.

9 years agovulkan: Turn GdkVulkanContext into a GdkDrawContext
Benjamin Otte [Mon, 28 Nov 2016 16:55:46 +0000 (17:55 +0100)]
vulkan: Turn GdkVulkanContext into a GdkDrawContext

9 years agovulkan: Add more infrastructure
Benjamin Otte [Mon, 28 Nov 2016 15:34:01 +0000 (16:34 +0100)]
vulkan: Add more infrastructure

gdk_window_create_vulkan_context() now exists and will return a Vulkan
context for the given window. It even initializes the surface. But it
doesn't do anything useful yet.

9 years agovulkan: Initial support
Benjamin Otte [Mon, 21 Nov 2016 13:18:43 +0000 (14:18 +0100)]
vulkan: Initial support

Adds the gdk_display_ref_vulkan() and gdk_display_unref_vulkan()
functions which setup/tear down VUlkan support for the display.

Nothing is using those functions yet.

9 years agobuild: Add Vulkan detection code
Benjamin Otte [Mon, 21 Nov 2016 00:25:17 +0000 (01:25 +0100)]
build: Add Vulkan detection code

Also define GDK_WINDOWING_VULKAN if Vulkan is enabled.

9 years agoUpdate Italian translation
Gianvito Cavasoli [Fri, 9 Dec 2016 10:34:45 +0000 (10:34 +0000)]
Update Italian translation
(cherry picked from commit 44fb5c9c704c39fad392ca45c6c2d74d6633a4e4)

9 years agomir: swap buffers on paint
William Hua [Thu, 8 Dec 2016 20:28:31 +0000 (15:28 -0500)]
mir: swap buffers on paint

9 years agowidget: Remove unused adjust_* vfuncs
Timm Bäder [Wed, 23 Nov 2016 16:46:44 +0000 (17:46 +0100)]
widget: Remove unused adjust_* vfuncs

Expose them privately to gtksizerequest.c using normal functions
instead.

9 years agomenu: Replace button-press-handler with gesture
Timm Bäder [Fri, 2 Dec 2016 12:20:47 +0000 (13:20 +0100)]
menu: Replace button-press-handler with gesture

9 years agotoolbar: Replace button-press-event handler with gesture
Timm Bäder [Fri, 2 Dec 2016 11:39:46 +0000 (12:39 +0100)]
toolbar: Replace button-press-event handler with gesture

9 years agolinkbutton: Replace button-press-event handler with gesture
Timm Bäder [Fri, 2 Dec 2016 11:22:41 +0000 (12:22 +0100)]
linkbutton: Replace button-press-event handler with gesture

9 years agoseparatortoolitem: Remove button-event/motion-event handlers
Timm Bäder [Fri, 2 Dec 2016 10:34:56 +0000 (11:34 +0100)]
separatortoolitem: Remove button-event/motion-event handlers

These only exist for the window dragging which does not exist anymore
currently. It will be reintroduced later in a form that does not require
these handlers.

9 years agosnapshot: Add annotations to parameters/return values
Timm Bäder [Thu, 1 Dec 2016 09:19:24 +0000 (10:19 +0100)]
snapshot: Add annotations to parameters/return values

9 years agowidget: Use gtk_widget_measure to measure widget sizes
Timm Bäder [Mon, 5 Dec 2016 17:19:04 +0000 (18:19 +0100)]
widget: Use gtk_widget_measure to measure widget sizes

9 years agowidget: Remove _gtk_widget_supports_clip
Timm Bäder [Tue, 22 Nov 2016 11:08:07 +0000 (12:08 +0100)]
widget: Remove _gtk_widget_supports_clip

9 years agowidget: Remove gtk_widget_invalidate_style_context
Timm Bäder [Tue, 22 Nov 2016 11:05:48 +0000 (12:05 +0100)]
widget: Remove gtk_widget_invalidate_style_context

9 years agowayland: Sync attributes also when drawing with GL
Benjamin Otte [Tue, 6 Dec 2016 17:01:34 +0000 (18:01 +0100)]
wayland: Sync attributes also when drawing with GL

Probably syncing attributes shouldn't happen when drawing in the first
place, but what do I know about Wayland. ¯\_(ツ)_/¯

9 years agowayland: Uncomment erroneously commented out code
Benjamin Otte [Tue, 6 Dec 2016 16:51:35 +0000 (17:51 +0100)]
wayland: Uncomment erroneously commented out code

I read the code as if (use_gl) instead of if (!use_gl) and commented it
out in bddfd7bb41cebd9b4e8ea418ce4d8e1f11822e81. That broke drawing on
Wayland without OpenGL completely.

Whoops.

Now it's back.

9 years agoGDK/Win32: Fix build after GDKGL refactoring
Chun-wei Fan [Tue, 6 Dec 2016 06:37:42 +0000 (14:37 +0800)]
GDK/Win32: Fix build after GDKGL refactoring

There were some parts that need some updates after the refactoring in
GDKGL, so that the code will continue to build and run.

For gdkwindow-win32.c, comment out the parts where we check for use_gl
(which was removed), since we are going to move all drawing to OpenGL,
but don't remove/disable the whole portion as that transition is not
complete at this point.

There a is new GDKGL function that checks for the damaged area of the back
buffer, but since the notion of "damage" is for *NIX (GLX/EGL for
Wayland/mir), meaning that there is no such extension for Windows in this
regard, so we can't support this on Windows as-is, at least for now.

https://bugzilla.gnome.org/show_bug.cgi?id=773299

9 years agoUpdate POTFILES.in
Piotr Drąg [Mon, 5 Dec 2016 18:46:59 +0000 (19:46 +0100)]
Update POTFILES.in

9 years agobuild: add gir depends for GdkX11, GdkWin32, and Gsk on Gdk
William Hua [Mon, 5 Dec 2016 16:37:20 +0000 (11:37 -0500)]
build: add gir depends for GdkX11, GdkWin32, and Gsk on Gdk

https://bugzilla.gnome.org/show_bug.cgi?id=775651

9 years agomir: fix type warning
William Hua [Mon, 5 Dec 2016 16:06:32 +0000 (11:06 -0500)]
mir: fix type warning

9 years agomir: fix build failures
William Hua [Mon, 5 Dec 2016 15:28:34 +0000 (10:28 -0500)]
mir: fix build failures

9 years agomir: implement display monitor vfuncs
William Hua [Tue, 29 Nov 2016 17:38:47 +0000 (12:38 -0500)]
mir: implement display monitor vfuncs

9 years agogdkgl: Add gdk_gl_context_get_damage()
Benjamin Otte [Sun, 4 Dec 2016 15:33:13 +0000 (16:33 +0100)]
gdkgl: Add gdk_gl_context_get_damage()

This is a way to query the damaged area of the backbuffer.

The GL renderer uses this to compute the extents of that damage region
(computed via buffer age) and use them to minimize the area to redraw.

This changes the semantics of GL rendering to "When calling
gdk_window_begin_frame() with a GL context, the area by
gdk_gl_context_get_damage() needs to be redrawn and every other pixel of
the backbuffer is guaranteed to be correct.
After gdk_window_end_frame() on a GL-drawn window, the whole backbuffer
must be correct.

We can always glXBufferSwap() now because of this.

9 years agoinspector: Add support for displayin the render region
Benjamin Otte [Sun, 4 Dec 2016 15:32:38 +0000 (16:32 +0100)]
inspector: Add support for displayin the render region

Now I just need a UI designer that makes this look nice...

9 years agoglrenderer: Always redraw the whole screen
Benjamin Otte [Sun, 27 Nov 2016 15:37:31 +0000 (16:37 +0100)]
glrenderer: Always redraw the whole screen

9 years agogdk: Make gdk_window_begin_draw_frame() take a draw context
Benjamin Otte [Thu, 1 Dec 2016 00:38:20 +0000 (01:38 +0100)]
gdk: Make gdk_window_begin_draw_frame() take a draw context

... instead of a gl context.

This requires some refactoring in the way we mark the shared context as
drawing: We now call begin_frame/end_frame() on it and ignore the call
on the main context.
Unfortunately we need to do this check in all vfuncs, which sucks. But I
haven't found a better way.

9 years agogskrenderer: Add gsk_renderer_begin_draw_frame()
Benjamin Otte [Sun, 27 Nov 2016 15:21:02 +0000 (16:21 +0100)]
gskrenderer: Add gsk_renderer_begin_draw_frame()

This way, we can hijack the begin/end draw process and do out own
processing before passing it on to GDK.

9 years agoinspector: Pass the drawing context into the recorder
Benjamin Otte [Wed, 30 Nov 2016 17:55:45 +0000 (18:55 +0100)]
inspector: Pass the drawing context into the recorder

That way we can capture both the actual changes (clip region) and the
area that was redrawn (render region), which in OpenGL might not be
identical.

Nothing shows the render region yet though...

9 years agoglrenderer: Always redraw the whole screen
Benjamin Otte [Sun, 27 Nov 2016 15:37:31 +0000 (16:37 +0100)]
glrenderer: Always redraw the whole screen

9 years agogsk: Change GSK_USE_SOFTWARE env var to GSK_RENDERER
Benjamin Otte [Tue, 29 Nov 2016 12:36:31 +0000 (13:36 +0100)]
gsk: Change GSK_USE_SOFTWARE env var to GSK_RENDERER

This way, we can use the variable as more than a boolean flag.

This will be useful for Vulkan or D3D renderers.

9 years agogdk: Turn GdkGLContext into a GdkDrawContext
Benjamin Otte [Mon, 28 Nov 2016 16:36:37 +0000 (17:36 +0100)]
gdk: Turn GdkGLContext into a GdkDrawContext

9 years agogdk: Add GdkDrawContext
Benjamin Otte [Mon, 28 Nov 2016 16:22:35 +0000 (17:22 +0100)]
gdk: Add GdkDrawContext

This will be the base class for GdkVulkanContext and GdkGLContext.

9 years agogdk: Redo GL drawing
Benjamin Otte [Wed, 23 Nov 2016 04:54:50 +0000 (05:54 +0100)]
gdk: Redo GL drawing

Reenable GL drawing, but do it without Cairo.

Now, the context passed to gdk_window_begin_draw_frame() decides how
drawing is going to happen. If it is NULL, Cairo is used like before.

If a context is passed, Cairo may not be used for drawing and
gdk_drawing_context_get_cairo_context() is going to return NULL.
Instead, the GL renderer must draw to the GL backbuffer and
end_draw_frame() is then swapping that to the front.

The GskGLRenderer has lost the texture it used to render to and adapted
to render directly to the backbuffer instead.

The only thing missing is for GtkGLArea to gain back a performant way to
render. But it didn't have one since the introduction of GSK, this
patchset doesn't change anything about it.

The new rendering avoids two indirections (the GSK renderer's texture
and the GDK double buffering surface).
It improves icon count in the fishbowl demo by 30%.

9 years agoglcontext: Make begin/end_draw() paired
Benjamin Otte [Wed, 23 Nov 2016 04:18:43 +0000 (05:18 +0100)]
glcontext: Make begin/end_draw() paired

This way, we can query the GL context's state via
gdk_gl_context_is_drawing().

Use this function to make GL contexts as attached and grant them access
to the front/backbuffer for rendering.

All of this is still unused because GL drawing is still disabled.

9 years agogdk: Large GL refactoring
Benjamin Otte [Wed, 23 Nov 2016 02:32:22 +0000 (03:32 +0100)]
gdk: Large GL refactoring

No visible changes as GL rendering is disabled at the moment.

What was done:

1. Move window->invalidate_for_new_frame to glcontext->begin_frame
This moves the code to where it is used (the GLContext) and prepares it
for being called where it is used when actually beginning to draw the
frame.

2. Get rid of buffer-age usage
We want to let the application render directly to the backbuffer.
Because of that, we cannot make any assumptions about the contents the
application renders outside the clip area.
In particular GskGLRenderer renders random stuff there but not actual
contents.

3. Pass the actual GL context
Previously, we passed the shared context to end_frame, now we pass the
actual GL context that the application uses for rendering. This is so
that the vfuncs could prepare the actual contexts for rendering (they
don't currently).

4. Simplify the code
The previous code set up the final drawing method in begin_frame.
Instead, we now just ensure the clip area is something we can render
and decide on the actual method in end_frame.
This is both more robust (we can change the clip area in between if we
want to) and less code.

9 years agogsk: Allow 0 for gsk_gl_driver_begin_frame()
Benjamin Otte [Wed, 23 Nov 2016 00:03:59 +0000 (01:03 +0100)]
gsk: Allow 0 for gsk_gl_driver_begin_frame()

Special-case this situation to unset the current framebuffer and render
to the backbuffer again.

9 years agogdk: Don't recurse when processing updates
Benjamin Otte [Tue, 22 Nov 2016 20:23:21 +0000 (21:23 +0100)]
gdk: Don't recurse when processing updates

We don't need to send expose events for backwards compatibility anymore.

9 years agogdk: Remove all code that only existed because of use_gl
Benjamin Otte [Tue, 22 Nov 2016 19:03:14 +0000 (20:03 +0100)]
gdk: Remove all code that only existed because of use_gl

Now that we don't use GL anymore, this code is unnecessary.

9 years agogdk: Never draw with GL
Benjamin Otte [Tue, 22 Nov 2016 18:45:04 +0000 (19:45 +0100)]
gdk: Never draw with GL

This is a temporary switch-off of the GL dawing code that will make
things keep running. All GL related code (like the GSK renderer or
GtkGLArea will now fall back to software.

9 years agogskrenderer: Store the GL context
Benjamin Otte [Wed, 23 Nov 2016 05:54:03 +0000 (06:54 +0100)]
gskrenderer: Store the GL context

And use it to create the drawing context with it.

Note that this doesn't yet have any effect and is all infrastructure
preparation work.

9 years agoAPI: Require passing a GLContext to begin_draw_frame()
Benjamin Otte [Tue, 22 Nov 2016 03:12:51 +0000 (04:12 +0100)]
API: Require passing a GLContext to begin_draw_frame()

This is in preparation for requiring explicit passing of GL contexts
when drawing.

9 years agowindow: Change behavior of gdk_window_begin_draw_frame()
Benjamin Otte [Sun, 20 Nov 2016 19:42:37 +0000 (20:42 +0100)]
window: Change behavior of gdk_window_begin_draw_frame()

(1) Require a native window
(2) Create the drawing context before calling begin_paint().

9 years agodrawingcontext: Store the GL paint context
Benjamin Otte [Sun, 20 Nov 2016 19:37:22 +0000 (20:37 +0100)]
drawingcontext: Store the GL paint context

9 years agocssgadget: Compute relative to own allocation, not widget allocation
Benjamin Otte [Tue, 29 Nov 2016 10:32:45 +0000 (11:32 +0100)]
cssgadget: Compute relative to own allocation, not widget allocation

This would lead to clipped gadgets when the gadget allocation differed
from the widget allocation, like in GtkListBox.

9 years agowayland: destroy subsurfaces along with parents
Olivier Fourdan [Wed, 23 Nov 2016 13:45:16 +0000 (14:45 +0100)]
wayland: destroy subsurfaces along with parents

Wayland subsurfaces can have other native window parents, but those need
to be destroyed along with the rest of the window hierarchy otherwise
an assert() is reached.

https://bugzilla.gnome.org/show_bug.cgi?id=774915

9 years agoframe: Use gtk_widget_measure to measure child sizes
Timm Bäder [Sat, 3 Dec 2016 12:32:46 +0000 (13:32 +0100)]
frame: Use gtk_widget_measure to measure child sizes

9 years agoviewport: Use gtk_widget_measure to measure child sizes
Timm Bäder [Thu, 1 Dec 2016 19:10:17 +0000 (20:10 +0100)]
viewport: Use gtk_widget_measure to measure child sizes

and rewrite the adjustment handling in a orientation-agnostic way.

9 years agoscrolledwindow: measure child widgets using gtk_widget_measure
Timm Bäder [Thu, 1 Dec 2016 18:44:02 +0000 (19:44 +0100)]
scrolledwindow: measure child widgets using gtk_widget_measure

9 years agorevealer: Measure child widget size using gtk_widget_measure
Timm Bäder [Thu, 1 Dec 2016 18:33:38 +0000 (19:33 +0100)]
revealer: Measure child widget size using gtk_widget_measure

9 years agoheaderbar: measure children using gtk_widget_measure
Timm Bäder [Thu, 1 Dec 2016 18:29:13 +0000 (19:29 +0100)]
headerbar: measure children using gtk_widget_measure

9 years agowidget-factory: Use GtkButton:icon-name to construct icon buttons
Timm Bäder [Sat, 3 Dec 2016 13:42:05 +0000 (14:42 +0100)]
widget-factory: Use GtkButton:icon-name to construct icon buttons

9 years agotoolpalette: call set_has_window
Timm Bäder [Sun, 4 Dec 2016 10:49:29 +0000 (11:49 +0100)]
toolpalette: call set_has_window

9 years agoprintunixdialog: Remove GtkDrawingArea::draw handler
Timm Bäder [Sun, 4 Dec 2016 10:49:41 +0000 (11:49 +0100)]
printunixdialog: Remove GtkDrawingArea::draw handler

the source file has been updated to use gtk_drawing_area_set_draw_func,
but the draw_cb handler in the ui file is still left.

9 years agostylecontext: Remove a bunch of unneeded headers
Benjamin Otte [Sat, 3 Dec 2016 13:58:21 +0000 (14:58 +0100)]
stylecontext: Remove a bunch of unneeded headers

9 years agoGtkProgressBar: trivial conditional optimisation
Daniel Boles [Sat, 3 Dec 2016 02:35:27 +0000 (02:35 +0000)]
GtkProgressBar: trivial conditional optimisation

I'd hope the compiler would realise this for us, but let's be explicit.

9 years agoentry: Refactor get_icon_pixbuf
Timm Bäder [Fri, 2 Dec 2016 14:16:10 +0000 (15:16 +0100)]
entry: Refactor get_icon_pixbuf

This way it will only return a pixbuf if the icon helper has a pixbuf.

9 years agoiconhelper: Ensure the surface used for textures is ARGB32
Timm Bäder [Fri, 2 Dec 2016 16:32:12 +0000 (17:32 +0100)]
iconhelper: Ensure the surface used for textures is ARGB32

9 years agoiconhelper: Remove allocate implementation
Timm Bäder [Fri, 2 Dec 2016 14:20:39 +0000 (15:20 +0100)]
iconhelper: Remove allocate implementation

9 years agolistbox: Fix row hovering
Timm Bäder [Wed, 30 Nov 2016 10:27:32 +0000 (11:27 +0100)]
listbox: Fix row hovering

GtkListBox is not a windowed widget anymore so we can't use
gtk_widget_get_window. Just directly access priv->view_window instead to
get the right window.

9 years agospinbutton: Remove _get_panels
Timm Bäder [Tue, 22 Nov 2016 20:00:40 +0000 (21:00 +0100)]
spinbutton: Remove _get_panels

9 years agoRemove gtk_widget_get_preferred_height_and_baseline_for_width
Timm Bäder [Wed, 23 Nov 2016 17:05:09 +0000 (18:05 +0100)]
Remove gtk_widget_get_preferred_height_and_baseline_for_width

It's just a wrapper around gtk_widget_measure nowadays.

9 years agotogglebutton: Remove unused defines
Timm Bäder [Mon, 28 Nov 2016 18:32:10 +0000 (19:32 +0100)]
togglebutton: Remove unused defines

9 years agoflowbox: Fix get_child_at_index crash with an invalid index
Debarshi Ray [Fri, 2 Dec 2016 15:38:05 +0000 (16:38 +0100)]
flowbox: Fix get_child_at_index crash with an invalid index

https://bugzilla.gnome.org/show_bug.cgi?id=775525

9 years agoComboBox: Fix the whitespace fix
Daniel Boles [Thu, 1 Dec 2016 12:58:29 +0000 (12:58 +0000)]
ComboBox: Fix the whitespace fix